
using System.Runtime.InteropServices;
using NativeTrees;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using UnityEngine;


namespace EasyPhysic.Collider
{
    public   struct  ColliderBody  
    {
        
        #region 需要定义的集合
        /// <summary>
        /// 目标分组ID
        /// </summary>
        public  UnsafeList<int> TargetGroups;
        /// <summary>
        /// 目标
        /// </summary>
        public  UnsafeParallelHashSet<int> Targets;
        /// <summary>
        /// 多边形的顶点，如果是多边形，需要自己更新顶点
        /// </summary>
        public UnsafeList<Vector2> Vertexs;
        
        #endregion
       
        public ColliderType ColliderType;
        
        /// <summary>
        /// 唯一ID
        /// </summary>
        public int SerialId;
        
        /// <summary>
        /// 分组ID
        /// </summary>
        public int GroupId;

       
        /// <summary>
        /// 形状类型
        /// </summary>
        public ColliderShapeType ColliderShapeType;
        
        /// <summary>
        /// 中心点，需要自己更新中心点
        /// </summary>
        public Vector2 Center;
        
        

        /// <summary>
        /// 半径
        /// </summary>
        public float Radius;

        /// <summary>
        /// 是有效的，如果无效，则会暂时跳过，有效则会进行检查
        /// </summary>
        public bool IsValid;
        /// <summary>
        /// AABB包围盒
        /// </summary>
        public AABB2D Bound;

        

        public void OnDrawGizmos(Color color)
        {
           
        }
    }
}